<div id="page-wrapper">
	<div class="row">
		<div class="col-lg-12">
			<h3 class="page-header">
				<span>浙里味道-美食活动</span>
			</h3>
		</div>
		<!-- /.col-lg-12 -->
	</div>
	<!-- /.row -->

	<div class="row">
		<div class="col-lg-12">
			<div class="panel panel-default">
				<div class="panel-heading">
				</div>
				<!-- /.panel-heading -->
				<div class="panel-body">
					<div class="table-responsive">
						<table class="table table-bordered">
							<thead>
								<tr>
									<!--<th><input type="checkbox" data-action="checkboxAll"></th>-->
									<th width="5%">编号</th>
									<th width="20%">活动名称</th>
									<th width="30%">链接首页地址</th>
									<th width="10%">创建时间</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<foreach name='datas' item='data' >
									<tr>
										<!--<td><input type="checkbox" data-action="checkboxOnce" name="praises[]" value="{$data['id']}" form="praiseOpera"></td>-->
										<td>{$data['id']}</td>
										<td>{$data['title']}</td>
										<td><?php echo "http://" . $_SERVER['SERVER_NAME'] . "/Wap/praiseeat/index/praise/" . $data['id']?></td>
										<td>{$data['keyword']}</td>
										<td>
											<a type="button" href="{:U('User/praiseeat/edit', array('praise' => $data['id']))}" class="btn btn-success">编辑</a>
											<a type="button" href="{:U('User/praiseeat/items', array('praise_id' => $data['id']))}" class="btn btn-primary">投票项</a>
											<a type="button" href="{:U('User/praiseeat/share', array('id' => $data['id']))}" class="btn btn-info">分享设置</a>
											<a type="button" href="{:U('User/praiseeat/desc', array('id' => $data['id']))}" class="btn btn-default">说明</a>
										</td>
									</tr>
								</foreach>
							</tbody> 
						</table>
					</div>
					<!-- /.table-responsive -->
				</div>
				<!-- /.panel-body -->
			</div>
			<!-- /.panel -->
		</div>
		<!-- /.col-lg-6 -->
	</div>
	<nav>
		<ul class="pagination">
			<php>
				$uri = $_SERVER['REQUEST_URI'];
				$str_p = strpos( $uri, 'page' );
				$str_q = false;
				if( $str_p != false ){
					//$str_q = strpos( $uri, "&", $str_p );
					$str_q = strlen($uri);
				}
				if( $str_p != false && $str_q != false ){
					$uri = substr_replace( $uri, "", $str_p, $str_q - $str_p );
				}
				$str_p = strrpos( $uri, "?" );
				if( $str_p == strlen($uri) - 1 ){
					$uri = substr_replace( $uri, "", $str_p, 1 );
				}
				$str_p = strrpos( $uri, "&" );
				if( $str_p == strlen($uri) - 1 ){
					$uri = substr_replace( $uri, "", $str_p, 1 );
				}
			</php>
			<if condition="$page['pre'] gt 0 ">
				<li>
					<a href="{:implode(array( $uri, '&', 'page', '=', $page['pre']) )}" aria-label="Previous">
						<span aria-hidden="true">&laquo;</span>
					</a>
				</li>
			</if>
			<for start="1" end=":intval( $page['count'] ) ">
				<li class="{$page['curren']==$i ? 'active':''}"><a href="{:implode(array( $uri, '&', 'page', '=', $i) )}">{$i}</a></li>
			</for>
			<if condition="$page['next'] lt ( $page['count'] )">
				<li>
					<a href="{:implode(array( $uri, '&', 'page', '=', $page['next']) )}" aria-label="Next">
						<span aria-hidden="true">&raquo;</span>
					</a>
				</li>
			</if>
		</ul>
	</nav> 
	<!-- /.row -->
</div>
<!-- /#page-wrapper -->
<import type="js" file="common" basepath="/Public/js" />
<script type="text/javascript">
//	common.multiSelect.init( "checkboxAll", "checkboxOnce" );
</script>
